package com.yz.code_test;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author Administrator
 */
public class TestDemo2 {
    public static void main(String[] args) {
        LocalDateTime localDate = LocalDateTime.now();

        DateTimeFormatter dateTimeFormatter =   DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

        String format = localDate.format(dateTimeFormatter);
        System.out.println(format);

    }
}
